package pt.ist.meic.pava;


public aspect Pointcuts {

	pointcut staticCreation() :  staticinitialization( * );
	
	
	//SHARED
	pointcut shared(Object obj) :  within(@pt.ist.meic.pava.Shared *) && target(obj);

	//ATOMIC @pt.ist.meic.pava.Atomic
	pointcut atomic() : execution(@pt.ist.meic.pava.Atomic *  *(..));// && args(obj);//
	
	
	
	//INITIALIZATION
	pointcut init(Object obj) : initialization(*.new (..)) && within(@pt.ist.meic.pava.Shared *) && target(obj);

	//INT
	pointcut intGetter(Object obj) : get(!static int *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut intSetter(Object obj, int arg) : set(!static int *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//DOUBLE
	pointcut doubleGetter(Object obj) : get(!static double *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut doubleSetter(Object obj, double arg) : set(!static double *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//BYTE
	pointcut byteGetter(Object obj) : get(!static byte *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut byteSetter(Object obj, byte arg) : set(!static byte *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//SHORT
	pointcut shortGetter(Object obj) : get(!static short *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut shortSetter(Object obj, short arg) : set(!static short *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//LONG
	pointcut longGetter(Object obj) : get(!static long *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut longSetter(Object obj, long arg) : set(!static long *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//FLOAT
	pointcut floatGetter(Object obj) : get(!static float *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut floatSetter(Object obj, float arg) : set(!static float *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//BOOLEAN
	pointcut booleanGetter(Object obj) : get(!static boolean *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut booleanSetter(Object obj, boolean arg) : set(!static boolean *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//CHAR
	pointcut charGetter(Object obj) : get(!static char *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut charSetter(Object obj, char arg) : set(!static char *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//OBJECT
	pointcut objectGetter(Object o) : get(!static * *) && within(@pt.ist.meic.pava.Shared *) && target(o);
	pointcut objectSetter(Object obj, Object arg) : set(!static * *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);
	
	//STATICS--------------------------------------------------------------
	
	//INT 
	pointcut intGetterStatic(Object obj) : get(static int *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut intSetterStatic(Object obj, int arg) : set(static int *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//DOUBLE
	pointcut doubleGetterStatic(Object obj) : get(static double *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut doubleSetterStatic(Object obj, double arg) : set(static double *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//BYTE
	pointcut byteGetterStatic(Object obj) : get(static byte *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut byteSetterStatic(Object obj, byte arg) : set(static byte *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//SHORT
	pointcut shortGetterStatic(Object obj) : get(static short *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut shortSetterStatic(Object obj, short arg) : set(static short *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//LONG
	pointcut longGetterStatic(Object obj) : get(static long *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut longSetterStatic(Object obj, long arg) : set(static long *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//FLOAT
	pointcut floatGetterStatic(Object obj) : get(static float *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut floatSetterStatic(Object obj, float arg) : set(static float *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//BOOLEAN
	pointcut booleanGetterStatic(Object obj) : get(static boolean *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut booleanSetterStatic(Object obj, boolean arg) : set(static boolean *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//CHAR
	pointcut charGetterStatic(Object obj) : get(static char *) && within(@pt.ist.meic.pava.Shared *) && target(obj);
	pointcut charSetterStatic(Object obj, char arg) : set(static char *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

	//OBJECT
	pointcut objectGetterStatic(Object o) : get(static * *) && within(@pt.ist.meic.pava.Shared *) && target(o);
	pointcut objectSetterStatic(Object obj, Object arg) : set(static * *) && within(@pt.ist.meic.pava.Shared *) && target(obj) && args(arg);

}
